/********************************************************************************
Name:  PreferredAccountPhone
Copyright © 2012  HFH International
======================================================
======================================================
Purpose:
-------
To make only one active Account Phone as preferred. 
======================================================
======================================================
History 
-------
VERSION  AUTHOR                DATE        DETAIL              
  1.0  - CG DEV TEAM    7/10/2012   INITIAL DEVELOPMENT  
*********************************************************************************/ 
trigger PreferredAccountPhone on Account_Phone__c(before insert,before update,before delete) {
    

AccountPhoneTriggerHandler  triggerhandler=new AccountPhoneTriggerHandler();  
if(trigger.isInsert && trigger.isBefore){
    triggerhandler.AccountPhoneInsert(trigger.new);
  }
  if(trigger.isupdate && trigger.isBefore){
      triggerhandler.AccountPhoneUpdate(trigger.new,trigger.old);
  }
  if(trigger.isdelete && trigger.isBefore){
      triggerhandler.AccountPhoneDelete(trigger.old);
  }
}